﻿using System;

namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入一个数字：");
            int a = 0;
            a = Convert.ToInt32(Console.ReadLine());
            int b = 2;
            while (a > 1)
            {
                for (b = 2; b < a; b++)
                {
                    if (a % b == 0)
                    {
                        Console.WriteLine(b);
                        break;
                    }
                }
                a = a / b;
            }
            Console.WriteLine(1);
            Console.WriteLine(b);
            Console.ReadKey();
        }
    }
}
